package com.yuanfengPlus.basicInfoManage.loginfo.service.impl;

import com.yuanfengPlus.basicInfoManage.loginfo.dao.ILogInfoMapper;
import com.yuanfengPlus.basicInfoManage.loginfo.model.LogInfo;
import com.yuanfengPlus.basicInfoManage.loginfo.service.ILogInfoService;
import com.yuanfengPlus.utils.Result;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LogInfoServiceImpl implements ILogInfoService {
    @Resource
    private ILogInfoMapper ilim;
    @Override
    public Result<List<LogInfo>> selectAll() {
        List<LogInfo> logInfos = ilim.selectAll();
        if (logInfos == null && logInfos.isEmpty())
            return Result.failure(500,"日志为空");
        return Result.success(logInfos);
    }
}
